home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / quicktimeintro / graphic import.export / macshell / macshell.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-10-06  |  2.6 KB  |  95 lines

  1. #ifndef __MACSHELL_H__
  2.     #define __MACSHELL_H__
  3.     
  4. // build for carbon
  5. #ifndef TARGET_API_MAC_CARBON
  6.     #define TARGET_API_MAC_CARBON 1
  7. #endif
  8.  
  9. // includes
  10. #include <ConditionalMacros.h>
  11. #include <Gestalt.h>
  12. #include <Types.h>
  13. #include <Memory.h>
  14. #include <Quickdraw.h>
  15. #include <Fonts.h>
  16. #include <Events.h>
  17. #include <Menus.h>
  18. #include <TextEdit.h>
  19. #include <TextUtils.h>
  20. #include <MacWindows.h>
  21. #include <MacMemory.h>
  22. #include <Dialogs.h>
  23. #include <OSUtils.h>
  24. #include <ToolUtils.h>
  25. #include <Devices.h>
  26. #include <FixMath.h>
  27. #include <Endian.h>
  28. #include <Resources.h>
  29. #include <FileTypesAndCreators.h>
  30. #include <Navigation.h>
  31. #include <Movies.h>
  32. #include <ImageCompression.h>
  33. #include <ImageCodec.h>
  34. #include <QuickTimeComponents.h>
  35.  
  36. // Typedefs
  37. //------------------------------------------------------------------------------
  38. typedef const OSTypePtr TypeListPtr;
  39.  
  40. #if TARGET_OS_MAC
  41.     typedef MenuHandle            MenuReference;
  42.     typedef WindowPtr            WindowReference;
  43.     typedef NavObjectFilterUPP    QTFrameFileFilterUPP;
  44. #endif
  45.  
  46. #if TARGET_OS_WIN32
  47.     typedef HMENU                MenuReference;
  48.     typedef HWND                WindowReference;
  49.     typedef FileFilterUPP        QTFrameFileFilterUPP;
  50. #endif
  51.  
  52. // Defines & Constants
  53. //------------------------------------------------------------------------------
  54. #define    BailNULL(n)  if (!n) goto bail;
  55. #define    BailError(n) if (n) goto bail;
  56. #if TARGET_OS_MAC
  57.     #define PASCAL_RTN pascal
  58. #endif
  59.  
  60. enum {
  61.     kAppleMenuID            = 128,
  62.         kAppleMenuAbout            = 1,
  63.     kFileMenuID                = 129,
  64.         kFileMenuQuit            = 1,
  65.     kDemoMenuID                = 130,
  66.         kDemoMenuDraw            = 1,
  67.         kDemoMenuScaleRotate    = 2,
  68.         kDemoMenuAlpha            = 3,
  69.         kDemoMenuMoreInfo        = 4,
  70.         kDemoMenuMultipleImage    = 5,
  71.         kDemoMenuURLImage        = 6,
  72.         kDemoMenuFiltersExport    = 7,
  73.         kDemoMenuMovieImage        = 8    
  74. };
  75.  
  76. void pause( void );
  77. void DrawImage( void );
  78. void ScaleAndRotate( void );
  79. void AlphaComposite( void );
  80. void GetMoreInfo( void );
  81. void MultipleImage( void );
  82. void ImageFromURL( void );
  83. void FilterExport( void );
  84. void MovieToImage( void );
  85.  
  86. Boolean IsQuickTimeInstalled(void);
  87. OSErr GetOneFileWithPreview (short theNumTypes, TypeListPtr theTypeList, FSSpecPtr theFSSpecPtr, void *theFilterProc);
  88. OSErr PutFile(ConstStr255Param thePrompt, ConstStr255Param theFileName, FSSpecPtr theFSSpecPtr, Boolean *theIsSelected, Boolean *theIsReplacing);
  89. OSErr BuildMovieValidFileTypes( Handle list, long *count );
  90. OSErr BuildGraphicsImporterValidFileTypes( Handle list, long *count );
  91. OSErr BuildGraphicsImporterValidFileNameSuffixes( Handle list, long *count );
  92. OSErr BuildAllValidFileTypes( Handle list, long *count );
  93. OSErr BuildAllValidFileNameSuffixes( Handle list, long *count );
  94.     
  95. #endif // __MACSHELL_H__